A. B. C. D. E. F. G. H. I. J. K. L. M. N. O. P. Q. R. S. T. U. V. W. X. Y. Z.
x = 5;
y = 6;
z = x + y;
elements are all displayed in fixed letter size and spacing.
HTML For Keyboard Input
The HTML element defines keyboard input:
Example
Use the command ctrl + S to save
Result:
Use the command ctrl + S to save
HTML For Computer Output
The HTML element defines sample output from a computer program:
Example
demo.example.com login: Apr 12 09:10:17
Result:
demo.example.com login: Apr 12 09:10:17
HTML For Computer Code
The HTML element defines a piece of programming code:
Example
x = 5;
y = 6;
z = x + y;
Result:
x = 5; y = 6; z = x + y;
Notice that the element does not preserve extra whitespace and line-breaks.
To fix this, you can put the element inside a element:
Example
x = 5;
y = 6;
z = x + y;
Result:
x = 5;
y = 6;
z = x + y;
HTML For Variables
The HTML element defines a variable.
The variable could be a variable in a mathematical
expression or a variable in programming context:
Example
Einstein wrote: E = mc2.
Result:
Einstein wrote: E = mc2.
HTML Code for File Download
Download a file by clicking on text:
Clickable text
Example:
Homework
(People will see the word “Homework” on your site and click on it to download the PDF.)
Download a file by clicking on an image:
Example: